<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>国内新闻</title>
    <meta content="" name="description"/>
    <meta content="" name="author"/>
    <link rel="stylesheet" type="text/css" href="/static/css/swiper.min.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/style.css"/>
    <!-- Favicon -->
    <link rel="shortcut icon" href="/static/assets/images/favicon.png" type="image/x-icon"/>
    <!-- For iPhone -->
    <!-- For iPhone 4 Retina display -->
    <link rel="apple-touch-icon-precomposed" sizes="114x114">
    <!-- For iPad -->
    <link rel="apple-touch-icon-precomposed" sizes="72x72">
    <!-- For iPad Retina display -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144">

    <!-- CORE CSS FRAMEWORK - START -->
    <link href="/static/assets/plugins/pace/pace-theme-flash.css" rel="stylesheet" type="text/css" media="screen"/>
    <link rel="stylesheet" href="https://www.jq22.com/jquery/bootstrap-3.3.4.css">
    <link href="/static/assets/fonts/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css"/>
    <link href="/static/assets/fonts/webfont/cryptocoins.css" rel="stylesheet" type="text/css"/>
    <link href="/static/assets/css/animate.min.css" rel="stylesheet" type="text/css"/>
    <link href="/static/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" type="text/css"/>
    <!-- CORE CSS FRAMEWORK - END -->

    <!-- HEADER SCRIPTS INCLUDED ON THIS PAGE - START -->
    <link href="/static/assets/plugins/jvectormap/jquery-jvectormap-2.0.1.css" rel="stylesheet" type="text/css"
          media="screen">
    <link href="/static/assets/plugins/icheck/skins/all.css" rel="stylesheet" type="text/css" media="screen">
    <!-- HEADER SCRIPTS INCLUDED ON THIS PAGE - END -->

    <!-- CORE CSS TEMPLATE - START -->
    <link href="/static/assets/css/style.css" rel="stylesheet" type="text/css"/>
    <!-- CORE CSS TEMPLATE - END -->

</head>
<!-- END HEAD -->

<!-- BEGIN BODY -->

<body class=" ">
<div id="app">
    <!-- START TOPBAR -->
    <div class='page-topbar'>
        <div>
            <h3 style="position: relative;left: 20px;top:6px;font-size: 23px;color: black">新闻推荐系统</h3>
        </div>
        <div class='quick-area'>
            <div class='pull-left'>

            </div>
            <div class='pull-right'>
                <ul class="info-menu right-links list-inline list-unstyled" style="position:relative;top: -40px;">
                    <li class="profile">
                        <a href="#" data-toggle="dropdown" class="toggle">
                            <img src="/static/data/profile/profile.jpg" alt="user-image" class="img-circle img-inline">
                            <span> {% verbatim %} {{ userss }} {% endverbatim %}</span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>

    </div>
    <!-- END TOPBAR -->
    <!-- START CONTAINER -->
    <div class="page-container row-fluid container-fluid">

        <!-- SIDEBAR - START -->

        <div class="page-sidebar fixedscroll">

            <!-- MAIN MENU - START -->
            <div class="page-sidebar-wrapper" id="main-menu-wrapper">

                 <ul class='wraplist'>
                    <li class='menusection'></li>

                    <li class="open">
                        <a href="http://127.0.0.1:8000/">
                            <i class="fa fa-th-large"></i>
                            <span class="title">主页</span>
                        </a>
                    </li>

                    <li class="">
                        <a href="http://127.0.0.1:8000/href/guonei/">
                            <i class="fa fa-line-chart"></i>
                            <span class="title">国内新闻</span>
                            <span class=""></span>
                        </a>

                    </li>

                    <li class="">
                        <a href="http://127.0.0.1:8000/href/guoji/">
                            <i class="fa fa-line-chart"></i>
                            <span class="title">国际新闻</span>
                            <span class=""></span>
                        </a>

                    </li>


                    <li class="">
                        <a href="http://127.0.0.1:8000/href/junshi/">
                            <i class="fa fa-line-chart"></i>
                            <span class="title">军事新闻</span>
                            <span class=""></span>
                        </a>

                    </li>


                    <li class="">
                        <a href="http://127.0.0.1:8000/href/caijing/">
                            <i class="fa fa-line-chart"></i>
                            <span class="title">财经新闻</span>
                            <span class=""></span>
                        </a>

                    </li>

                    <li class="">
                        <a href="http://127.0.0.1:8000/href/yule/">
                            <i class="fa fa-line-chart"></i>
                            <span class="title">娱乐新闻</span>
                            <span class=""></span>
                        </a>

                    </li>


                    <li class="">
                        <a href="http://127.0.0.1:8000/href/tiyu/">
                            <i class="fa fa-line-chart"></i>
                            <span class="title">体育新闻</span>
                            <span class=""></span>
                        </a>
                    </li>

                     <li class="">
                        <a href="http://127.0.0.1:8000/href/search/">
                            <i class="fa fa-line-chart"></i>
                            <span class="title">搜索历史</span>
                            <span class=""></span>
                        </a>
                    </li>


                     <li class="">
                        <a href="http://127.0.0.1:8000/href/recommend/">
                            <i class="fa fa-line-chart"></i>
                            <span class="title">新闻推荐</span>
                            <span class=""></span>
                        </a>
                    </li>


                    <li class="">
                        <a href="http://127.0.0.1:8000/href/update/">
                            <i class="fa fa-wrench" aria-hidden="true"></i>
                            <span class="title">搜索新闻</span>
                            <span class=""></span>
                        </a>
                    </li>


                    <li class="">
                        <a href="http://127.0.0.1:8000/login/">
                            <i class="fa fa-sign-out" aria-hidden="true"></i>
                            <span class="title">退出</span>
                            <span class=""></span>
                        </a>
                    </li>

                </ul>

            </div>
            <!-- MAIN MENU - END -->

        </div>
        <!--  SIDEBAR - END -->

        <!-- START CONTENT -->
        <section id="main-content" class="">
            <div class="wrapper main-wrapper row" style="">

                <div class="clearfix"></div>
                <!-- MAIN CONTENT AREA STARTS -->

                <div class="col-lg-12">
                    <section class="box nobox marginBottom0">
                        <div class="content-body">
                            <div class="row">

                                <div class="col-lg-3 col-sm-6 col-xs-12">
                                    <div class="statistics-box box-c1 flex align-items-center">
                                        <div class="mb-15 box-content-l">

                                            <div class="stats">
                                                <h3 class="bold mb-5">通知公告一</h3>
                                                <span>通知公告一</span>
                                            </div>
                                        </div>
                                        <div id="spark1"></div>
                                    </div>
                                </div>
                                <div class="col-lg-3 col-sm-6 col-xs-12">
                                    <div class="statistics-box box-c2 flex align-items-center">
                                        <div class="mb-15 box-content-l">

                                            <div class="stats">
                                                <h3 class="bold mb-5">通知公告二</h3>
                                                <span>通知公告二</span>
                                            </div>
                                        </div>
                                        <div id="spark2"></div>
                                    </div>
                                </div>
                                <div class="col-lg-3 col-sm-6 col-xs-12">
                                    <div class="statistics-box box-c3 flex align-items-center">
                                        <div class="mb-15 box-content-l">

                                            <div class="stats">
                                                <h3 class="bold mb-5">通知公告三</h3>
                                                <span>通知公告三</span>
                                            </div>
                                        </div>
                                        <div id="spark3"></div>
                                    </div>
                                </div>
                                <div class="col-lg-3 col-sm-6 col-xs-12">
                                    <div class="statistics-box box-c4 flex align-items-center">
                                        <div class="mb-15 box-content-l">

                                            <div class="stats">
                                                <h3 class="bold mb-5">通知公告四</h3>
                                                <span>通知公告四</span>
                                            </div>
                                        </div>
                                        <div id="spark4"></div>
                                    </div>
                                </div>

                            </div>
                            <!-- End .row -->
                        </div>
                    </section>
                </div>

                <div class="clearfix"></div>


                <div class="col-lg-12">
                    <section class="box">
                        <header class="panel_header">
                            <h2 class="title pull-left" style="color: #0396FF">本网站数据源百度新闻库,数据仅用于参考,如又侵权请联系作者</h2>
                            <div class="actions panel_actions pull-right">
                                <a class="box_toggle fa fa-chevron-down"></a>
                                <a class="box_setting fa fa-cog" data-toggle="modal" href="#section-settings"></a>
                                <a class="box_close fa fa-times"></a>
                            </div>
                        </header>
                        <div class="content-body">
                            <div class="row">
                                <div class="col-xs-12">


                                    <div class="table-bordered" data-pattern="priority-columns">

                                        <!--banner-->
                                        <div style="height: 800px;width: 100%;overflow-y: auto;color: black">
                                            <table class="table table-bordered" style="text-align: left;">
                                                <thead>
                                                <tr style="background: dodgerblue;font-size: 18px">
                                                    <th scope="col" style="width: 200px;">国内新闻列表</th>

                                                    <th scope="col" style="width: 600px;">标题</th>
                                                    <th scope="col" style="width: 600px;">更新时间</th>
                                                    <th scope="col" style="width: 100px;">更新状态</th>
                                                    <th scope="col" style="width: 200px;text-align: center">操作</th>

                                                </tr>
                                                </thead>
                                                <tbody>

                                                <tr v-for="item,key in remen_data" style="font-size: 15px;">
                                                    <td scope="row" style="font-size: 22px;">{%verbatim %} {{ key+1 }}
                                                        {% endverbatim %}
                                                    </td>

                                                    <td scope="row">{%verbatim %} {{ item.title }} {% endverbatim %}</td>


                                                    <td scope="row" style="font-size: 22px;">{% verbatim %} {{ item.time }} {% endverbatim %}</td>

                                                    <td scope="row" style="font-size: 22px;"><span class="badge badge-success">Finish</span></td>

                                                    <td scope="row">
                                                        <a :href="item.url" class="btn btn-primary"
                                                           style="width: 130px;border-radius: 4px;position:relative;left: 22px">跳转查看</a>
                                                    </td>
                                                </tr>

                                                </tbody>
                                            </table>
                                        </div>
                                        <!--banner end-->


                                    </div>


                                </div>
                            </div>
                        </div>
                    </section>

                </div>

                <div class="clearfix"></div>


                <!-- MAIN CONTENT AREA ENDS -->
            </div>
        </section>

        </div>
    </div>
</div>
<!-- END CONTAINER -->
<!-- LOAD FILES AT PAGE END FOR FASTER LOADING -->

<!-- CORE JS FRAMEWORK - START -->
<script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script src="/static/assets/js/jquery.easing.min.js"></script>
<script src="https://www.jq22.com/jquery/bootstrap-3.3.4.js"></script>
<script src="/static/assets/plugins/pace/pace.min.js"></script>
<script src="/static/assets/plugins/perfect-scrollbar/perfect-scrollbar.min.js"></script>
<script src="/static/assets/plugins/viewport/viewportchecker.js"></script>
<script>
    window.jQuery || document.write('<script src="/static/js/jquery-1.11.2.min.js"><\/script>');
</script>
<!-- CORE JS FRAMEWORK - END -->

<!-- OTHER SCRIPTS INCLUDED ON THIS PAGE - START -->
<script src="/static/assets/plugins/sparkline-chart/jquery.sparkline.min.js"></script>
<script src="/static/assets/js/chart-chartjs.js"></script>


<script src="/static/assets/js/dash-scripts.js"></script>
<!-- OTHER SCRIPTS INCLUDED ON THIS PAGE - END -->

<!-- CORE TEMPLATE JS - START -->
<script src="/static/assets/js/scripts.js"></script>
<!-- END CORE TEMPLATE JS - END -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            userss: "",
            remen_data: [],
        },

        created() {
            // 判断是否已经登录
            this.userss = sessionStorage.getItem("username");
            if (this.userss == null) {
                alert("抱歉，您还未登录");
                window.location.href = "http://127.0.0.1:8000/login/"
            }


            axios.get('http://127.0.0.1:8000/guonei/show/?page=1&size=100', {}).then(response => {
                response.data.data.some((item, i) => {
                    this.remen_data.push({
                        title: item.title,
                        url: item.url,
                        time: item.time,
                    })
                })

            }).catch(error => {
                console.log("请求异常", error);
                alert("请求异常")
            })

        },

        methods: {}

    })
</script>
<script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script src="/static/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>


</body>

</html>













